package com.wendy.common.core.context;

import com.alibaba.ttl.TransmittableThreadLocal;
import com.wendy.common.core.page.PageBO;

/**
 * 获取一个分页对象
 *
 * @author wendy
 */
public class PageContextHolder {

    private static final TransmittableThreadLocal<PageBO> THREAD_LOCAL = new TransmittableThreadLocal<>();

    public static void set(PageBO page) {
        THREAD_LOCAL.set(page);
    }

    public static PageBO get() {
       return THREAD_LOCAL.get();
    }

    public static void remove() {
        THREAD_LOCAL.remove();
    }
}
